package demo.bean;

// Generated Jan 16, 2014 7:03:03 PM by Hibernate Tools 4.0.0

import java.util.Date;
import java.util.HashSet;
import java.util.Set;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.OneToMany;
import javax.persistence.Table;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;

/**
 * PgaJob generated by hbm2java
 */
@Entity
@Table(name = "pga_job", schema = "pgagent")
public class PgaJob implements java.io.Serializable {

	private int jobid;
	private PgaJobclass pgaJobclass;
	private PgaJobagent pgaJobagent;
	private String jobname;
	private String jobdesc;
	private String jobhostagent;
	private boolean jobenabled;
	private Date jobcreated;
	private Date jobchanged;
	private Date jobnextrun;
	private Date joblastrun;
	private Set<PgaJobstep> pgaJobsteps = new HashSet<PgaJobstep>(0);
	private Set<PgaSchedule> pgaSchedules = new HashSet<PgaSchedule>(0);
	private Set<PgaJoblog> pgaJoblogs = new HashSet<PgaJoblog>(0);

	public PgaJob() {
	}

	public PgaJob(int jobid, PgaJobclass pgaJobclass, String jobname,
			String jobdesc, String jobhostagent, boolean jobenabled,
			Date jobcreated, Date jobchanged) {
		this.jobid = jobid;
		this.pgaJobclass = pgaJobclass;
		this.jobname = jobname;
		this.jobdesc = jobdesc;
		this.jobhostagent = jobhostagent;
		this.jobenabled = jobenabled;
		this.jobcreated = jobcreated;
		this.jobchanged = jobchanged;
	}

	public PgaJob(int jobid, PgaJobclass pgaJobclass, PgaJobagent pgaJobagent,
			String jobname, String jobdesc, String jobhostagent,
			boolean jobenabled, Date jobcreated, Date jobchanged,
			Date jobnextrun, Date joblastrun, Set<PgaJobstep> pgaJobsteps,
			Set<PgaSchedule> pgaSchedules, Set<PgaJoblog> pgaJoblogs) {
		this.jobid = jobid;
		this.pgaJobclass = pgaJobclass;
		this.pgaJobagent = pgaJobagent;
		this.jobname = jobname;
		this.jobdesc = jobdesc;
		this.jobhostagent = jobhostagent;
		this.jobenabled = jobenabled;
		this.jobcreated = jobcreated;
		this.jobchanged = jobchanged;
		this.jobnextrun = jobnextrun;
		this.joblastrun = joblastrun;
		this.pgaJobsteps = pgaJobsteps;
		this.pgaSchedules = pgaSchedules;
		this.pgaJoblogs = pgaJoblogs;
	}

	@Id
	@Column(name = "jobid", unique = true, nullable = false)
	public int getJobid() {
		return this.jobid;
	}

	public void setJobid(int jobid) {
		this.jobid = jobid;
	}

	@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumn(name = "jobjclid", nullable = false)
	public PgaJobclass getPgaJobclass() {
		return this.pgaJobclass;
	}

	public void setPgaJobclass(PgaJobclass pgaJobclass) {
		this.pgaJobclass = pgaJobclass;
	}

	@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumn(name = "jobagentid")
	public PgaJobagent getPgaJobagent() {
		return this.pgaJobagent;
	}

	public void setPgaJobagent(PgaJobagent pgaJobagent) {
		this.pgaJobagent = pgaJobagent;
	}

	@Column(name = "jobname", nullable = false)
	public String getJobname() {
		return this.jobname;
	}

	public void setJobname(String jobname) {
		this.jobname = jobname;
	}

	@Column(name = "jobdesc", nullable = false)
	public String getJobdesc() {
		return this.jobdesc;
	}

	public void setJobdesc(String jobdesc) {
		this.jobdesc = jobdesc;
	}

	@Column(name = "jobhostagent", nullable = false)
	public String getJobhostagent() {
		return this.jobhostagent;
	}

	public void setJobhostagent(String jobhostagent) {
		this.jobhostagent = jobhostagent;
	}

	@Column(name = "jobenabled", nullable = false)
	public boolean isJobenabled() {
		return this.jobenabled;
	}

	public void setJobenabled(boolean jobenabled) {
		this.jobenabled = jobenabled;
	}

	@Temporal(TemporalType.TIMESTAMP)
	@Column(name = "jobcreated", nullable = false, length = 35)
	public Date getJobcreated() {
		return this.jobcreated;
	}

	public void setJobcreated(Date jobcreated) {
		this.jobcreated = jobcreated;
	}

	@Temporal(TemporalType.TIMESTAMP)
	@Column(name = "jobchanged", nullable = false, length = 35)
	public Date getJobchanged() {
		return this.jobchanged;
	}

	public void setJobchanged(Date jobchanged) {
		this.jobchanged = jobchanged;
	}

	@Temporal(TemporalType.TIMESTAMP)
	@Column(name = "jobnextrun", length = 35)
	public Date getJobnextrun() {
		return this.jobnextrun;
	}

	public void setJobnextrun(Date jobnextrun) {
		this.jobnextrun = jobnextrun;
	}

	@Temporal(TemporalType.TIMESTAMP)
	@Column(name = "joblastrun", length = 35)
	public Date getJoblastrun() {
		return this.joblastrun;
	}

	public void setJoblastrun(Date joblastrun) {
		this.joblastrun = joblastrun;
	}

	@OneToMany(fetch = FetchType.LAZY, mappedBy = "pgaJob")
	public Set<PgaJobstep> getPgaJobsteps() {
		return this.pgaJobsteps;
	}

	public void setPgaJobsteps(Set<PgaJobstep> pgaJobsteps) {
		this.pgaJobsteps = pgaJobsteps;
	}

	@OneToMany(fetch = FetchType.LAZY, mappedBy = "pgaJob")
	public Set<PgaSchedule> getPgaSchedules() {
		return this.pgaSchedules;
	}

	public void setPgaSchedules(Set<PgaSchedule> pgaSchedules) {
		this.pgaSchedules = pgaSchedules;
	}

	@OneToMany(fetch = FetchType.LAZY, mappedBy = "pgaJob")
	public Set<PgaJoblog> getPgaJoblogs() {
		return this.pgaJoblogs;
	}

	public void setPgaJoblogs(Set<PgaJoblog> pgaJoblogs) {
		this.pgaJoblogs = pgaJoblogs;
	}

}
